<template lang="pug">
  div
    s-table(
      ref="table"
      :column="tableObj.column"
      :queryFn="tableObj.getList"
      :queryPropsParams="{taskId: id}"
      rowKey="taskId"
      title="任务详情列表"
      )
      template(slot="sbmtStas" slot-scope="text, scope") {{dictFilter(text, 'SCEN_SBMT_STAS')}}
      template(slot="chkStas" slot-scope="text, scope") {{dictFilter(text, 'SCEN_CHK_STAS')}}
    affix
      el-card.mt12.tr
        el-button(@click="$router.go(-1)" size="small") 返回
</template>
<script>
import { STable, Affix } from '@/components'
import { taskInfoList } from '@/api/remote'

const column = [
  {
    prop: 'sort',
    label: '序号'
  },
  {
    prop: 'medinsName',
    label: '医疗机构'
  },
  {
    prop: 'psnName',
    label: '患者'
  },
  {
    prop: 'deptName',
    label: '科室'
  },
  {
    prop: 'sbmtStas',
    label: '提交状态',
    align: 'center'
  },
  {
    prop: 'sbmtTime',
    label: '提交时间',
    align: 'center'
  },
  {
    prop: 'chkStas',
    label: '审核状态',
    align: 'center'
  },
  {
    prop: 'chkTime',
    label: '审核时间',
    align: 'center'
  },
  {
    prop: 'chkerName',
    label: '审核人'
  },
  {
    prop: 'chkerRema',
    label: '审核备注'
  }
]

export default {
  name: 'RemoteAddList',
  components: {
    STable,
    Affix
  },
  computed: {
    id () {
      return this.$route.query.id || ''
    }
  },
  data () {
    return {
      tableObj: {
        column,
        getList: taskInfoList
      }
    }
  },
  methods: {
    // 刷新表格
    refreshTable (flag = false) {
      this.$refs.table.refresh(flag)
    }
  }
}
</script>
